package com.afinal.intelligencetrash.global;

import android.app.Application;
import android.content.Context;

import com.afinal.intelligencetrash.dagger.component.ActivityComponent;
import com.afinal.intelligencetrash.dagger.component.DaggerActivityComponent;
import com.afinal.intelligencetrash.dagger.module.ActivityModule;


/**jian
 * Created by cyy on 17-10-8.
 */

public class CustomApplication extends Application {
    private static Context applicationContext = null;
    private ActivityComponent activityComponent;

    @Override
    public void onCreate() {
        super.onCreate();
        applicationContext = getApplicationContext();
        activityComponent = DaggerActivityComponent.builder().activityModule(ActivityModule.getInstance()).build();
    }

    public static Context getCustomApplicationContext(){
        return applicationContext;
    }

    public ActivityComponent getActivityComponent(){
        return activityComponent;
    }
}
